<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="/includes/head.jsp" />

<div id="page">
	<div id="header"></div>

	<div id="mainarea">
		<div id="sidebar">
			<div id="headerleft">
				<h1>
					<a href="<c:url value="/home.jsp" />"><fmt:message
							key="time_pesquisa" />
					</a>
				</h1>
			</div>
			<div id="menulinks">
				<a href="<c:url value="/home.jsp" />"><fmt:message key="home" />
				</a> <a href="<c:url value="/membro/index" />"><fmt:message
						key="membros" />
				</a> <a href="<c:url value="/publicacao/index" />"><fmt:message
						key="publicacoes" />
				</a> 
				<a class="active" href="<c:url value="/linhaPesquisa/index" />"><fmt:message key="linha" /> </a>
					#if($historicoVisitas)
					<a href="<c:url value="/visitante/index" />"><fmt:message key="visitante" /> </a>
					#end								
				<a href="<c:url value="/contato.jsp" />"><fmt:message
						key="contato" />
				</a>
			</div>
		</div>

		<div id="contentarea">
			<h2>
				<fmt:message key="linha" />
			</h2>

			<div id="mensagem">
				<c:set var="msg">${mensagem}</c:set>						
				<% String msg = (String)pageContext.getAttribute("msg");%>
				<% if(!msg.equals("")){%>
					<h4>
						<fmt:message key="${mensagem}" />
					</h4>
				<%}%>
			</div>

			<div id="filter">

				<FORM name="filtrarmembro" action="<c:url value="/linhaPesquisa/index"/>"
					method="POST">
					<p>
						<LABEL for="titulo"><fmt:message key="titulo" /></LABEL> 
						<INPUT type="text" name="linhaPesquisa.titulo" size="29" value="${linhaPesquisa.titulo}">
						 
						<LABEL for="sumario"><fmt:message key="sumario" /></LABEL> 
						<INPUT type="text" name="linhaPesquisa.sumario" size="29" value="${linhaPesquisa.sumario}">
					</p>
					<p>
						<INPUT value="<fmt:message key="filtrar" />" type="submit">
						<INPUT value="<fmt:message key="limpar" />" type="reset">
					</p>

				</FORM>
			</div>

			<br />
			<table align=center>
				<c:forEach items="${linhaPesquisaList}" var="linhaPesquisa">
					<tr>
						<td><a
							href='<c:url value="/linhaPesquisa/detalhe?id=${linhaPesquisa.id}" />'>${linhaPesquisa.titulo}</a>
						</td>
						<td>${linhaPesquisa.sumario}</td>
						<td>${linhaPesquisa.links}</td>
						<td>${linhaPesquisa.financiadores}</td>
					</tr>
				</c:forEach>
			</table>

			<br> <br> <br>

			<table align=center border="0">
				<tr>
					<td>
						<form id="botaoAdicionar"
							action="<c:url value="/linhaPesquisa/form"/>">
							<input value="<fmt:message key="adicionar" />" type="submit">
						</form>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<jsp:include page="/includes/tail.jsp" />